﻿using IDEAMS.common.converter;
using IDEAMS.core.queue;
using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace IDEAMS.core.alarm
{
    public class AlarmEvent
    {
        public string serialNo;
        public DateTime tm;
        public bool soundOn;
        public bool uploadOn;
        public List<AlarmSensor> sensors;
    }

    public class AlarmSensor
    {
        public MonitorWarnLevel level;
        public string name;
        public double value;
    }

    public class AlarmQueueData : QueueData
    {
        public AlarmEvent alarmEvent;
    }

    [TypeConverter(typeof(EnumDescriptionTypeConverter))]
    public enum MonitorWarnLevel
    {
        [Description("全部")]
        ALL,
        [Description("正常")]
        NORMAL,
        [Description("预警")]
        PRE_ALARM,
        [Description("报警")]
        ALARM
    }
}
